#ifndef _WMARK_MANAGER_H
#define _WMARK_MANAGER_H
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <log/log.h>
#include <iostream>
#include <string.h>
#include "wmark_dev.h"
#include "ResultBufIntface.h"
#include "DmaBufManager.h"
#include "WmarkBufManager.h"
#include "AlgorithmModule.h"
#include "WmarkDev.h"

namespace camera::algorithm
{
    class WmarkManager : public ResultBufIntface
    {
    public:
        WmarkManager();
        ~WmarkManager();
        int handle(algorithm_info_t &info);

    private:
        void onResult(wmark_buf_t &info) override;

    private:
        std::mutex mMutex;
        DmaBufManager *mDmaBufManager = NULL;
        WmarkBufManager *mWmarkBufManager = NULL;
        WmarkDev *mWmarkDev = NULL;

        void checkData(uint8_t *buf, uint64_t len);
    };
}

#endif